package ru.picman;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * Activity for the level select-screen. Launched when "start game" is chosen from the main menu.
 * @author David
 *
 */
public class PicmanLevels 
			 extends Activity
{
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.picman_levels);
		
		Button lvl1Button = (Button)findViewById(R.id.level1);
		lvl1Button.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				level = 1;
				startActivity(new Intent(PicmanLevels.this,PicmanGame.class));
			}
		});
		
		Button lvl2Button = (Button)findViewById(R.id.level2);
		lvl2Button.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				level = 2;
				startActivity(new Intent(PicmanLevels.this,PicmanGame.class));
			}
		});
		
		Button lvl3Button = (Button)findViewById(R.id.level3);
		lvl3Button.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				level = 3;
				startActivity(new Intent(PicmanLevels.this,PicmanGame.class));
			}
		});
		
		Button lvl4Button = (Button)findViewById(R.id.level4);
		lvl4Button.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				level = 4;
				startActivity(new Intent(PicmanLevels.this,PicmanGame.class));
			}
		});
	}
	
	//
	
	public static int level;
	
}
